package com.cn.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Data;

/**
 * @author: chenyuncong
 * @Date: 2020/6/24 16:32
 * 订单表
 */
@Data
@TableName(value = "g_goods")
public class Goods {


//    @TableId(type = IdType.NONE) //默认 跟随全局策略走  根据雪花算法生成,
    @TableId(type = IdType.AUTO) //主键自增 数据库中需要设置主键自增
    private Long id;
    //商品名字
    private String goodsName;
    //商品标题
    private String goodsTitle;
    //商品图片
    private String goodsImg;
    //商品单价,单位分
    private Long goodsPrice;
    //商品库存
    private Integer goodsStock;

    @Version
    private Integer version;

    private Long createTime;
}
